package com.sxj.shop.service;

import com.sxj.shop.entity.Order;
import com.sxj.shop.entity.User;
import com.sxj.shop.exception.RequestParameterErrorException;
import com.sxj.shop.exception.UserNotLoginException;
import com.sxj.shop.vo.Cart;

import java.util.List;

public interface OrderService {

    /**
     * 结算
     * 结算时将自动保存订单与明细信息
     * @param cart
     * @param user
     * @return
     */
    String createNo(Cart cart, User user) throws UserNotLoginException;

    List<Order> findMyOrders(User user) throws UserNotLoginException;

    Order findDetailById(String id) throws RequestParameterErrorException;
}
